<!doctype html>
<html lang="zh-CN">

<head>
  <meta charset="utf-8">
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title><%= newsData.title%></title>
  <meta name="keywords" content="<%= newsData.keywords%>">
  <meta name="description" content="<%= newsData.description%>">
  <link rel="stylesheet" type="text/css" href="/public/home/css/bootstrap.min.css">
  <link rel="stylesheet" type="text/css" href="/public/home/css/nprogress.css">
  <link rel="stylesheet" type="text/css" href="/public/home/css/style.css">
  <link rel="stylesheet" type="text/css" href="/public/home/css/font-awesome.min.css">
  <link rel="apple-touch-icon-precomposed" href="/public/home/images/icon/icon.png">
  <link rel="shortcut icon" href="/public/home/images/icon/favicon.ico">
  <script src="/public/home/js/jquery-2.1.4.min.js"></script>
  <script src="/public/home/js/nprogress.js"></script>
  <script src="/public/home/js/jquery.lazyload.min.js"></script>
  <!--[if gte IE 9]>
  <script src="/public/home/js/jquery-1.11.1.min.js" type="text/javascript"></script>
  <script src="/public/home/js/html5shiv.min.js" type="text/javascript"></script>
  <script src="/public/home/js/respond.min.js" type="text/javascript"></script>
  <script src="/public/home/js/selectivizr-min.js" type="text/javascript"></script>
<![endif]-->
  <!--[if lt IE 9]>
  <script>window.location.href='upgrade-browser.html';</script>
<![endif]-->
</head>

<body class="user-select single">
  <% include common/head.html %>
  <section class="container">
    <div class="content-wrap">
      <div class="content">
        <header class="article-header">
          <h1 class="article-title"><a href="article.html"><%= newsData.title%></a></h1>
          <div class="article-meta"> <span class="item article-meta-time">
              <time class="time" data-toggle="tooltip" data-placement="bottom" title="时间：<%= newsData.time%>"><i
                  class="glyphicon glyphicon-time"></i> <%= newsData.time%></time>
            </span> <span class="item article-meta-source" data-toggle="tooltip" data-placement="bottom"
              title="<%= newsData.author%>">
              <i class="glyphicon glyphicon-globe"></i> <%= newsData.author%></span>
            <span class="item article-meta-category" data-toggle="tooltip" data-placement="bottom"
              title="栏目：<%= newsData.tname%>">
              <i class="glyphicon glyphicon-list"></i> <a href="program" title=""><%= newsData.tname%></a></span>
            <span class="item article-meta-views" data-toggle="tooltip" data-placement="bottom"
              title="查看：<%= newsData.num%>">
              <i class="glyphicon glyphicon-eye-open"></i> 共<%= newsData.num%>人围观</span>
            <span class="item article-meta-comment" data-toggle="tooltip" data-placement="bottom" title="评论：0">
              <i class="glyphicon glyphicon-comment"></i> 0个不明物体</span> </div>
        </header>
        <article class="article-content">
          <%- newsData.text%>
        </article>
        <div class="article-tags">标签：<a href="" rel="tag"><%= newsData.keywords%></a></div>
        <div class="relates">
          <div class="title">
            <h3>相关推荐</h3>
          </div>
          <ul>
            <% relaData.forEach(item=>{%>
            <% if (item.tid == newsData.tid && item.id !=newsData.id){%>
            <li><a href="/news?id=<%= item.id%>" ><%= item.title%></a></li>
            <%}else{%>
            <% }%>

            <% }) %>
          </ul>
        </div>
        <div class="title" id="comment">
          <h3>评论 <small>抢沙发</small></h3>
        </div>
        <!--<div id="respond">
        <div class="comment-signarea">
          <h3 class="text-muted">评论前必须登录！</h3>
          <p> <a href="javascript:;" class="btn btn-primary login" rel="nofollow">立即登录</a> &nbsp; <a href="javascript:;" class="btn btn-default register" rel="nofollow">注册</a> </p>
          <h3 class="text-muted">当前文章禁止评论</h3>
        </div>
      </div>-->
        <div id="respond">
          <form action="" method="post" id="comment-form">
            <div class="comment">
              <div class="comment-title"><img class="avatar" src="<%- userAvatar ? userAvatar :'' %>" alt="" /></div>
              <div class="comment-box">
                <textarea placeholder="您的评论可以一针见血" name="comment" id="comment-textarea" cols="100%" rows="3"
                  tabindex="1"></textarea>
                <div class="comment-ctrl"> <span class="emotion"><img src="/public/home/images/face/5.png" width="20"
                      height="20" alt="" />表情</span>
                  <div class="comment-prompt"> <i class="fa fa-spin fa-circle-o-notch"></i> <span
                      class="comment-prompt-text"></span> </div>
                  <input type="hidden" class="articleid" value=<%= newsData.id %> />
                  <input type="hidden" class="loginUser" value=<%= loginUser%> />
                  <button type="submit" name="comment-submit" id="comment-submit" tabindex="5" articleid="1">评论</button>
                </div>
              </div>
            </div>
          </form>
        </div>
        <div id="postcomments">
          <ol class="commentlist">
            <% commentData.forEach((item,key)=>{%>
            <li class="comment-content"><span class="comment-f"></span>
              <div class="comment-avatar"><img class="avatar" src="<%= item.avatar%>" alt="" /></div>
              <div class="comment-main">
                <p>来自<span class="address">广东广州（<%= item.username%>）</span>用户的评论：<span class="time "
                    style="float: right"><%= item.time%></span><br />
                  <%- item.text%>（#<%= newsDatanum-- %>）<span class="zan" onclick="addzan( `<%- item.user_id%>`)"></span></p>
              </div>
            </li>
            <%})%>
          </ol>

          <div class="quotes"><span class="disabled">首页</span><span class="disabled">上一页</span><a
              class="current">1</a><a href="">2</a><span class="disabled">下一页</span><span class="disabled">尾页</span>
          </div>
        </div>
      </div>
    </div>
    <aside class="sidebar">
      <div class="fixed">
        <div class="widget widget-tabs">
          <ul class="nav nav-tabs" role="tablist">
            <li role="presentation" class="active"><a href="#notice" aria-controls="notice" role="tab"
                data-toggle="tab">网站公告</a></li>
            <li role="presentation" class="<%- userAvatar ? 'hide' :'' %>"><a href="#centre" aria-controls="centre"
                role="tab" data-toggle="tab">会员中心</a></li>
            <li role="presentation"><a href="#contact" aria-controls="contact" role="tab" data-toggle="tab">联系站长</a>
            <li role="presentation"><a href="#netDisk" aria-controls="netDisk" role="tab" data-toggle="tab">网盘系统</a>
            </li>
          </ul>
          <div class="tab-content">
            <div role="tabpanel" class="tab-pane notice active" id="notice">
              <ul>
                <li>
                  <time datetime="2019-08-04">08-04</time>
                  <a href="" target="_blank">欢迎访问黄绍模博客</a></li>
                <li>
                  <time datetime="2019-08-04">08-04</time>
                  <a target="_blank" href="">在这里可以看到前端技术，后端程序，网站内容管理系统等文章，还有我的程序人生！</a></li>
                <li>
                  <time datetime="2019-08-04">08-04</time>
                  <a target="_blank" href="">在这个小工具中最多可以调用五条</a></li>
              </ul>
            </div>
            <div role="tabpanel" class="tab-pane centre" id="centre">
              <h4>需要登录才能进入会员中心</h4>
              <p> <a data-toggle="modal" data-target="#loginModal2" class="btn btn-primary">立即登录</a> <a
                  data-toggle="modal" data-target="#regModal2" class="btn btn-default">现在注册</a> </p>
            </div>
            <div role="tabpanel" class="tab-pane contact" id="contact">
              <h2>Email:<br />
                <a href="mailto:Aa1237841@163.com" data-toggle="tooltip" data-placement="bottom"
                  title="admin@ylsat.com">Aa1237841@163.com</a></h2>
            </div>
            <div role="tabpanel" class="tab-pane  netDisk" id="netDisk">
              <h4 class="btn btn-primary"><a href="/wp">进入我的个人网盘</a></h4>
            </div>
          </div>
        </div>
        <div class="widget widget_search">
          <form class="navbar-form" action="/Search" method="post">
            <div class="input-group">
              <input type="text" name="keyword" class="form-control" size="35" placeholder="请输入关键字" maxlength="15"
                autocomplete="off">
              <span class="input-group-btn">
                <button class="btn btn-default btn-search" name="search" type="submit">搜索</button>
              </span> </div>
          </form>
        </div>
      </div>
      <div class="widget widget_sentence">
        <h3>每日一句</h3>
        <div class="widget-sentence-content">
          <h4>2019年08月05日星期二</h4>
          <p>Do not let what you cannot do interfere with what you can do.<br />
            别让你不能做的事妨碍到你能做的事。（John Wooden）</p>
        </div>
      </div>
      <div class="widget widget_hot">
        <h3>热门文章</h3>
        <ul>
          <% hotData.forEach(item=>{%>
          <li>
            <a href="/news?id=<%= item.id%>">
              <span class="thumbnail"><img class="thumb" src="<%= item.img%>" alt=""></span>
              <span class="text"><%= item.info%></span><span class="muted"><i
                  class="glyphicon glyphicon-time"></i><%= item.time%> </span>
              <span class="muted"><i class="glyphicon glyphicon-eye-open"></i> <%= item.num%></span>
            </a>
          </li>
          <% }) %>
        </ul>
      </div>
    </aside>
  </section>
  <% include common/footer.html %>
  <!--微信二维码模态框-->

  <!--该功能正在日以继夜的开发中-->
  <div class="modal fade user-select" id="areDeveloping" tabindex="-1" role="dialog"
    aria-labelledby="areDevelopingModalLabel">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
              aria-hidden="true">&times;</span></button>
          <h4 class="modal-title" id="areDevelopingModalLabel" style="cursor:default;">该功能正在日以继夜的开发中…</h4>
        </div>
        <div class="modal-body"> <img src="/public/home/images/baoman/baoman_01.gif" alt="深思熟虑" />
          <p style="padding:15px 15px 15px 100px; position:absolute; top:15px; cursor:default;">
            很抱歉，程序猿正在日以继夜的开发此功能，本程序将会在以后的版本中持续完善！</p>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-primary" data-dismiss="modal">朕已阅</button>
        </div>
      </div>
    </div>
  </div>
  <!-- 登录模态框 -->
  <div class="modal fade user-select modal-style" id="loginModal2" tabindex="-1" role="dialog"
    aria-labelledby="loginModalLabel">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <form action="/login" method="post">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                aria-hidden="true">&times;</span></button>
            <h4 class="modal-title" id="loginModalLabel">登录</h4>
          </div>
          <div class="modal-body">
            <div class="form-group">
              <label for="loginModalUserNmae">用户名</label>
              <input type="text" class="form-control" id="username" name="username" placeholder="请输入用户名" autofocus
                maxlength="15" autocomplete="off" required>
            </div>
            <div class="form-group">
              <label for="loginModalUserPwd">密码</label>
              <input type="password" class="form-control" id="password" name="password" placeholder="请输入密码"
                maxlength="18" autocomplete="off" required>
            </div>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            <button type="button" class="btn btn-primary" id="login_btn">登录</button>
          </div>
        </form>
      </div>
    </div>
  </div>
  <!--注册模态框-->
  <div class="modal fade user-select modal-style" id="regModal2" tabindex="-1" role="dialog"
    aria-labelledby="regModalLabel">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <form action="/reg" method="post">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                aria-hidden="true">&times;</span></button>
            <h4 class="modal-title" id="regModalLabel">注册</h4>
          </div>
          <div class="modal-body">
            <div class="form-group">
              <label for="regModalUserNmae">用户名</label>
              <input type="text" class="form-control" id="regUsername" name="username" placeholder="请输入用户名" autofocus
                maxlength="12" autocomplete="off"
                data-validate="required:请输入管理员账户,length#>=6:账户名不能小于6位,length#<=12:账户名最多12位">
            </div>
            <div class="form-group">
              <label for="regModalUserPwd">密码</label>
              <input type="password" class="form-control" id="regPassword" name="password" placeholder="请输入密码"
                maxlength="18" autocomplete="off" data-validate="required:请输入密码,length#>=8:密码不能小于8位">
            </div>
            <div class="form-group">
              <label for="regModalUserPwd">确认密码</label>
              <input type="password" class="form-control" id="regRepassword" name="repassword" placeholder="请再次输入密码"
                maxlength="18" autocomplete="off" data-validate="required:请再次输入密码,repeat#password:两次输入的密码不一致">
            </div>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            <button type="submit" class="btn btn-primary" id='reg_btn'>注册</button>
          </div>
        </form>
      </div>
    </div>
  </div>
  <!-- 右键菜单列表 -->
  <% include common/rightClickMenu.html%>
  <script src="/public/home/js/bootstrap.min.js"></script>
  <script src="/public/home/js/jquery.ias.js"></script>
  <script src="/public/home/js/scripts.js"></script>
  <script src="/public/home/js/jquery.qqFace.js"></script>
  <script>
    $(function () {
      $('.emotion').qqFace({
        id: 'facebox',
        assign: 'comment-textarea',
        path: '/public/Home/images/arclist/'	//表情存放的路径
      });
    });
    /*文章点赞*/
    function addzan(user_id){
      $.get('/ajax_zan',{userid:user_id},function(data){

      })
    }
  </script>
</body>

</html>